package com.bcx.service;


import com.bcx.mapper.ProductMapper;
import com.bcx.pojo.Product;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    ProductMapper productMapper;
    @Override
    public List<Product> selectAllProduct() {
        return productMapper.selectByExample(null);
    }

    @Override
    public Product selectProductById(Integer id) {
        return productMapper.selectByPrimaryKey(id);
    }

    @Override
    public int update(Product product) {
        return productMapper.updateByPrimaryKeySelective(product);
    }
}
